<template>
    <div>
        <button class="btn">{{test  }}</button>
    </div>
</template>

<script setup>
import { ref,onMounted } from 'vue';
import { useRoute  } from 'vue-router';
const route = useRoute() //获取到值
const test =ref('')
onMounted(() => {
    test.value=route.query.id
    console.log(route.query.id);
})
</script>

<style lang="scss" scoped>
 .btn {
    font-size: 16px;
    color: #000;
    background-color: #c0c0c0;
    border: none;
    transform-style: preserve-3d;
    transition: transform 0.3s;
    padding: 10px;
    outline-offset: -4px;
    /* 轮廓线偏移 */
    border: none;
    box-shadow: inset -5px 0px 3px #6f6f6f,
      inset 5px 0px 3px#e6e6e6,
      inset 0px 5px 3px #e6e6e6,
      inset 0px -5px 3px #6f6f6f;
    /* 按钮默认内阴影样式 */
    transition: 0.1s linear;
  }
  </style>